package com.chuang.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 树形分类表

 * </p>
 *
 * @author vicente
 * @since 2021-12-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_tree_category")
public class TreeCategory extends Model<TreeCategory> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 父类型id
     */
    private Long pId;

    /**
     * 树形菜单的深度
     */
    private Integer deepNum;

    /**
     * 菜单名称
     */
    private String name;

    /**
     * 菜单排序
     */
    private Integer sortNum;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 0:显示1隐藏
     */
    private String delFlag;

    /**
     * 分类颜色
     */
    private String color;

    /**
     * 分类图标
     */
    private String icon;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
